package com.erdos.core.service;

import java.util.List;
import java.util.Map;

import com.erdos.common.service.BaseService;
import com.erdos.core.entity.State;

public interface StateService extends BaseService<State> {
	/**
	 * 根据状态代码查询状态
	 * @param stateId
	 * @return
	 * @author xiali2
	 * @since  2008-8-20
	 */
	public State findStateByStateId(String stateId);
	
	/**
	 * 通过类别查询状态集合
	 * @param category 类别代码参考@see com.hp.mes.md.constant.FSMConstant
	 * @param facilityId 工厂代码
	 * @return
	 * @author xiali2
	 * @since  2008-8-1
	 */
	public List<State> findStatesByCategoryAndFacilityId(String category,String facilityId);
	
	/**
	 * 通过类别查询状态集合Map，主要用于外部调用得到状态下拉框值
	 * @param category 类别代码参考@see com.hp.mes.md.constant.FSMConstant
	 * @param facilityId 工厂代码
	 * @return map key放状态代码stateId，value放状态描述stateDesc
	 * @author xiali2
	 * @since  2008-8-1
	 */
	public Map<String,String> findStatesMapByCategoryAndFacilityId(String category,String facilityId);
	
}
